package com.zimmur.app.mocolink.domain.param;

import java.util.Date;

import com.zimmur.app.mocolink.domain.util.DateUtils;
import com.zimmur.app.mocolink.domain.util.StringUtils;

public class RefundParam {

	private String status;
	private String keyword;
	private String createTimeStart;
	private String createTimeEnd;
	private String refundTimeStart;
	private String refundTimeEnd;
	private Double refundJeMin;
	private Double refundJeMax;
	private Integer pageNo;
	private Integer pageSize=10;
	
	private Integer pageBeginNo;
	private Date createDateStart;
	private Date createDateEnd;
	private Date refundDateStart;
	private Date refundDateEnd;
	
	public RefundParam(Integer pageNo){
		this.pageNo=pageNo;
		this.pageBeginNo=(pageNo-1)*this.pageSize;
	}
	public RefundParam(Integer pageNo,String status,String keyword,String createTimeStart,String createTimeEnd,
			String refundTimeStart,String refundTimeEnd,Double refundJeMin,Double refundJeMax){
		this.pageNo=pageNo;
		this.pageBeginNo=(pageNo-1)*this.pageSize;
		if(!StringUtils.isBlank(status)){
			this.status=status.trim();
		}
		if(!StringUtils.isBlank(keyword)){
			this.keyword=keyword.trim();
		}
		if(!StringUtils.isBlank(createTimeStart)){
			this.createTimeStart=createTimeStart;
			this.createDateStart=DateUtils.dateFormat(createTimeStart+" 00:00:00");
		}
		if(!StringUtils.isBlank(createTimeEnd)){
			this.createTimeEnd = createTimeEnd;
			this.createDateEnd = DateUtils.dateFormat(createTimeEnd+" 23:59:59");
		}
		if(!StringUtils.isBlank(refundTimeStart)){
			this.refundTimeStart=refundTimeStart;
			this.refundDateStart=DateUtils.dateFormat(refundTimeStart+" 00:00:00");
		}
		if(!StringUtils.isBlank(refundTimeEnd)){
			this.refundTimeEnd = refundTimeEnd;
			this.refundDateEnd = DateUtils.dateFormat(refundTimeEnd+" 23:59:59");
		}
		if(refundJeMin>0){
			this.refundJeMin=refundJeMin;
		}
		if(refundJeMax>0){
			this.refundJeMax = refundJeMax;
		}
		
	}
	public String getStatus() {
		return status;
	}
	public void setStatus(String status) {
		this.status = status;
	}
	public String getKeyword() {
		return keyword;
	}
	public void setKeyword(String keyword) {
		this.keyword = keyword;
	}
	public String getCreateTimeStart() {
		return createTimeStart;
	}
	public void setCreateTimeStart(String createTimeStart) {
		this.createTimeStart = createTimeStart;
	}
	public String getCreateTimeEnd() {
		return createTimeEnd;
	}
	public void setCreateTimeEnd(String createTimeEnd) {
		this.createTimeEnd = createTimeEnd;
	}
	public String getRefundTimeStart() {
		return refundTimeStart;
	}
	public void setRefundTimeStart(String refundTimeStart) {
		this.refundTimeStart = refundTimeStart;
	}
	public String getRefundTimeEnd() {
		return refundTimeEnd;
	}
	public void setRefundTimeEnd(String refundTimeEnd) {
		this.refundTimeEnd = refundTimeEnd;
	}
	public Double getRefundJeMin() {
		return refundJeMin;
	}
	public void setRefundJeMin(Double refundJeMin) {
		this.refundJeMin = refundJeMin;
	}
	public Double getRefundJeMax() {
		return refundJeMax;
	}
	public void setRefundJeMax(Double refundJeMax) {
		this.refundJeMax = refundJeMax;
	}
	public Integer getPageNo() {
		return pageNo;
	}
	public void setPageNo(Integer pageNo) {
		this.pageNo = pageNo;
	}
	public Integer getPageSize() {
		return pageSize;
	}
	public void setPageSize(Integer pageSize) {
		this.pageSize = pageSize;
	}
	public Integer getPageBeginNo() {
		return pageBeginNo;
	}
	public void setPageBeginNo(Integer pageBeginNo) {
		this.pageBeginNo = pageBeginNo;
	}
	public Date getCreateDateStart() {
		return createDateStart;
	}
	public void setCreateDateStart(Date createDateStart) {
		this.createDateStart = createDateStart;
	}
	public Date getCreateDateEnd() {
		return createDateEnd;
	}
	public void setCreateDateEnd(Date createDateEnd) {
		this.createDateEnd = createDateEnd;
	}
	public Date getRefundDateStart() {
		return refundDateStart;
	}
	public void setRefundDateStart(Date refundDateStart) {
		this.refundDateStart = refundDateStart;
	}
	public Date getRefundDateEnd() {
		return refundDateEnd;
	}
	public void setRefundDateEnd(Date refundDateEnd) {
		this.refundDateEnd = refundDateEnd;
	}
	
	
	
}
